package com.cxy.datawarehouse.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Entity
@ApiModel("标准代码表")
@Table(name = "t_standard_code")
@DynamicInsert
@DynamicUpdate
public class StandardCode implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键 标准代码类别编号
     */
    @Id
    @ApiModelProperty("标准代码编号")
    @Column(name = "standard_code_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long standardCodeId;

    /**
     * 标准代码名称
     */
    @ApiModelProperty("标准代码名称")
    @Column(name = "standard_code_name", nullable = false)
    private String standardCodeName;

    /**
     * 类别编号
     */
    @ApiModelProperty("类别编号")
    @Column(name = "class_id", nullable = false)
    private Long classId;

    /**
     * 标准级别
     */
    @ApiModelProperty("标准级别")
    @Column(name = "standard_level", nullable = false)
    private Long standardLevel;

    /**
     * 配置代码条数
     */
    @ApiModelProperty("配置代码条数")
    @Column(name = "config_code_number", nullable = false)
    private Long configCodeNumber;

    /**
     * 标准来源
     */
    @ApiModelProperty("标准来源")
    @Column(name = "standard_source", nullable = false)
    private String standardSource;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @Column(name = "crete_time", nullable = false)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @Column(name = "update_time", nullable = false)
    private LocalDateTime updateTime;

    /**
     * 使用状态 （0-停用 1-使用）
     */
    @ApiModelProperty("使用状态")
    @Column(name = "status", nullable = false)
    private Long status;
}
